/*
 * @Description: 
 * @Author: 姜暖阳
 * @Date: 2021-09-26 11:12:12
 * @LastEditTime: 2021-12-07 19:48:16
 * @LastEditors: 赵大壮
 * @Reference: 
 */
import { Message } from "element-ui";

class NYMessageToast {
    install() {
        // 初始化调用
    }

    success(msg: string) {
        Message({
            message: msg,
            type: 'success',
            offset: 100,
            duration: 2000
        });
    }
    warning(msg: string) {
        Message({
            message: msg,
            type: 'warning',
            offset: 100,
            duration: 2000
        });
    }
    error(msg: string) {
        Message({
            message: msg,
            type: 'error',
            offset: 100,
            duration: 2000
        });
    }
    info(msg: string) {
        Message({
            message: msg,
            offset: 100,
            duration: 2000
        });
    }
}

const nyMessageToast = new NYMessageToast();

export default nyMessageToast